package com.medical_backend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.medical_backend.entity.Menu;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MenuMapper extends BaseMapper<Menu> {
    @Delete("delete from menu where userid=#{userid}")
    void deleteByUserid(String userid);

    @Select("SELECT href FROM menu WHERE userid = #{userid}")
    List<String> selectMenusByUserid(String userid);
}
